#pragma once

#include "D3DApp.h"
#include <xnamath.h>
#include "baseModel.h"
#include "camera.h"
#include "animation.h"

class CMeshViewer:public D3DApp
{
public:
	CMeshViewer(HINSTANCE hInstance) :D3DApp(hInstance){}
	~CMeshViewer();

	virtual bool Init();
	virtual void Update(float dt);
	virtual void DrawScene();
	// Convenience overrides for handling mouse input.
	virtual void OnMouseDown(WPARAM btnState, int x, int y);
	virtual void OnMouseUp(WPARAM btnState, int x, int y);
	virtual void OnMouseMove(WPARAM btnState, int x, int y);

private:
	ID3D11Buffer*          mCBViewProj;
	ID3D11Buffer* mCBPerFrame;

	ID3D11VertexShader*     mVS;
	ID3D11PixelShader*      mPS;
	ID3D11InputLayout*      mInputLayout;
	ID3D11RasterizerState* mWireframeRS;
	ID3D11SamplerState* mSampleLinear;

	BaseModel * mModel;
	std::string mClipName;
	float mAnimTimePos;

	DirectionalLight mDirectionalLight;

	Camera mCam;

	POINT mLastMousePos;
};

